/******************************************************************************
 * Copyright (C) 2017 Chengdu Dlhd information industry co. LTD.
 * All Rights Reserved.
 * 本软件为成都顶联互动信息产业有限公司开发研制。未经本公司正式书面同意，其他任何个人、团体不得使用、复制、修改或发布本软件.
 *****************************************************************************/
package net.dgg.dggcloud.service.iboss.service.common;

import net.dgg.dggcloud.service.common.base.service.BaseService;
import net.dgg.dggcloud.service.iboss.entity.ScProOrder;
import net.dgg.dggcloud.service.jrcrm.service.cms.CustomerRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class UpdateRemarksService extends BaseService {
    @Autowired
    private CustomerRecordService customerRecordService;

    public ScProOrder queryScproorder(Long id) {
        ScProOrder scProOrder = repository.get(ScProOrder.class, id);
        return scProOrder;
    }

    public void updateRemarks(ScProOrder scProOrder, Map recordMap) {
        repository.saveOrUpdate(scProOrder);
        customerRecordService.saveCustomerRecord(recordMap);//写入备注
    }
}
